/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	ParameterStructuredBuffer.cpp
*
*	Comments	-	See ParameterStructuredBuffer.h
*
**************************************************************************************/
#include "../Include/ParameterStructuredBuffer.h"

namespace Pulse
{
	ParameterStructuredBuffer::ParameterStructuredBuffer( ParameterStructuredBuffer &rhs )
		: IParameter( rhs ), m_pBuffer( rhs.m_pBuffer )
	{
	}

	ParameterStructuredBuffer::~ParameterStructuredBuffer( void )
	{
	}

	void ParameterStructuredBuffer::SetData( void *pData )
	{
		m_pBuffer = (StructuredBuffer*)pData;
		IncrementChangeValue();
	}

	void ParameterStructuredBuffer::SetData( IParameter *pParam )
	{
		if ( pParam )
		{
			if ( pParam->GetType() == EParameter::STRUCTURED_BUFFER )
			{
				m_pBuffer = ((ParameterStructuredBuffer*)pParam)->m_pBuffer;
				IncrementChangeValue();
			}
		}
	}

}